package com.voltmao.persistent.mapper;

import org.apache.ibatis.annotations.Param;
import com.voltmao.persistent.model.ContractProviderAudit;
import com.voltmao.persistent.model.ContractProviderAuditCriteria;

import java.util.List;
import java.util.Map;

public interface ContractProviderAuditMapper {
    int countByExample(ContractProviderAuditCriteria example);

    int deleteByExample(ContractProviderAuditCriteria example);

    /**
     * 获取当前当日合同已初审通过数
     * @return 通过数量
     */
    int countByExample2();

    int deleteByPrimaryKey(String dataId);

    int insert(ContractProviderAudit record);

    int insertSelective(ContractProviderAudit record);

    List<ContractProviderAudit> selectByExample(ContractProviderAuditCriteria example);

    ContractProviderAudit selectByPrimaryKey(String dataId);

    int updateByExampleSelective(@Param("record") ContractProviderAudit record, @Param("example") ContractProviderAuditCriteria example);

    int updateByExample(@Param("record") ContractProviderAudit record, @Param("example") ContractProviderAuditCriteria example);

    int updateByPrimaryKeySelective(ContractProviderAudit record);

    int updateByPrimaryKey(ContractProviderAudit record);

    ContractProviderAudit selectByExampleForOne(ContractProviderAuditCriteria example);

    Map<String, Object> selectMapByPrimaryKey(String dataId);

    Map<String, Object> selectMapByExampleForOne(ContractProviderAuditCriteria example);

    List<Map<String, Object>> selectMapByExample(ContractProviderAuditCriteria example);


    /**
     * 根据合同获取合同审核MAP
     * @param cpId 合同表主键
     * @param isDel 是否删除
     */
    Map<String, Object> selectMapByCPId(@Param("cpId") String cpId, @Param("isDel") int isDel);
    /**
     * 根据合同获取合同审核对象
     * @param cpId 合同表主键
     * @param isDel 是否删除
     */
    ContractProviderAudit selectByCPId(@Param("cpId") String cpId, @Param("isDel") int isDel);
}